﻿namespace Steamworks
{
    using System;
    using System.Runtime.InteropServices;

    [StructLayout(LayoutKind.Sequential)]
    public struct ClientUnifiedMessageHandle : IEquatable<ClientUnifiedMessageHandle>, IComparable<ClientUnifiedMessageHandle>
    {
        public static readonly ClientUnifiedMessageHandle Invalid;
        public ulong m_ClientUnifiedMessageHandle;
        public ClientUnifiedMessageHandle(ulong value)
        {
            this.m_ClientUnifiedMessageHandle = value;
        }

        static ClientUnifiedMessageHandle()
        {
            Invalid = new ClientUnifiedMessageHandle(0L);
        }

        public override string ToString()
        {
            return this.m_ClientUnifiedMessageHandle.ToString();
        }

        public override bool Equals(object other)
        {
            return ((other is ClientUnifiedMessageHandle) && (this == ((ClientUnifiedMessageHandle) other)));
        }

        public override int GetHashCode()
        {
            return this.m_ClientUnifiedMessageHandle.GetHashCode();
        }

        public bool Equals(ClientUnifiedMessageHandle other)
        {
            return (this.m_ClientUnifiedMessageHandle == other.m_ClientUnifiedMessageHandle);
        }

        public int CompareTo(ClientUnifiedMessageHandle other)
        {
            return this.m_ClientUnifiedMessageHandle.CompareTo(other.m_ClientUnifiedMessageHandle);
        }

        public static bool operator ==(ClientUnifiedMessageHandle x, ClientUnifiedMessageHandle y)
        {
            return (x.m_ClientUnifiedMessageHandle == y.m_ClientUnifiedMessageHandle);
        }

        public static bool operator !=(ClientUnifiedMessageHandle x, ClientUnifiedMessageHandle y)
        {
            return !(x == y);
        }

        public static explicit operator ClientUnifiedMessageHandle(ulong value)
        {
            return new ClientUnifiedMessageHandle(value);
        }

        public static explicit operator ulong(ClientUnifiedMessageHandle that)
        {
            return that.m_ClientUnifiedMessageHandle;
        }
    }
}

